package cn.ljx.util;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.UUID;

import org.junit.Test;

public class BaseUtils {
	
	//生成32的UUID
	public static String getUUID32(){
		String id = "";  
        id = UUID.randomUUID().toString().replace("-", "").toLowerCase();
        return id;
    }
	
	
	//获得当前系统时间戳
	public static String getTime() throws Exception{
		SimpleDateFormat  sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
	    String  result  =  sdf.format(new Date());
	    return result;
	}
	
	public static String[] getLength(){
		String []a = new String[10];
		a[5] = "3";
		return a;
	}
	
	@Test
	public void test() throws Exception{
		String []a = getLength();
		for(int i=0;i<a.length;i++){			
			System.out.println(a[i]);
		}
	    System.out.println(a.length);
	}
	
}
